-- GENERATED SPELL FOR [Sunseeker Engineer] --


function spell0_20988(pUnit, Event) --@Death Ray,n/a--
pUnit:FullCastSpellOnTarget(36345,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20988', 1500, 1)
end

function spell1_20988(pUnit, Event) --@Death Ray,n/a--
pUnit:FullCastSpellOnTarget(39196,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20988', 1500, 1)
end

function spell2_20988(pUnit, Event) --@Growth Ray,n/a--
pUnit:FullCastSpellOnTarget(36346,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20988', 15293, 1)
end

function spell3_20988(pUnit, Event) --@Super Shrink Ray,n/a--
pUnit:FullCastSpellOnTarget(36341,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20988', 10278, 1)
end

function Sorts_20988(pUnit, Event)
local choix_sorts_20988 = math.random(0, 3)
if choix_sorts_20988 == 0 then
pUnit:RegisterEvent('spell0_20988', 1, 1)
end
if choix_sorts_20988 == 1 then
pUnit:RegisterEvent('spell1_20988', 1, 1)
end
if choix_sorts_20988 == 2 then
pUnit:RegisterEvent('spell2_20988', 1, 1)
end
if choix_sorts_20988 == 3 then
pUnit:RegisterEvent('spell3_20988', 1, 1)
end
end

function mob20988_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_20988', math.random(1500, 3000), 1)
end

function mob20988_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20988_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20988_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(20988, 1, 'mob20988_Action')
RegisterUnitEvent(20988, 2, 'mob20988_Leave')
RegisterUnitEvent(20988, 3, 'mob20988_Kill')
RegisterUnitEvent(20988, 4, 'mob20988_Die')
